#!/usr/bin/python
#encoding=utf-8
import collections
l = [
    ['222', 'das'],
    ['123', 'asd'],
    ['222', 'llkl']
]

# method 1

c1 = [i[0] for i in l].count('222')
print c1

# method 2

c2 = sum([1 for i in l if i[0] == '222'])
print c2

# method 3

c3 = reduce(lambda x, y: x + (y[0] == '222'), l, 0)
print c3

# method 4

c4 = filter(lambda x: x[0] == '222', l).__len__()
print c4

# method 5

c5 = sum([i[0] == '222' for i in l])
print c4

# method 6

c6 = sum(map(lambda x: x[0] == '222', l))
print c6

# method 7

c7 = map(lambda x: x[0], l).count('222')
print c7

# method 8

c8 = zip(*l)[0].count('222')
print c8

# method 9

c9 = 0
for i in l: c9 += (i[0] == '222')
print c9

# method 10

c10 = reduce(lambda x, y: x + [y[0]], l, []).count('222')
print c10


c11= collections.Counter('gallahad')
print c11